home *** CD-ROM | disk | FTP | other *** search
-
- package sub_arctic.input;
-
- import sub_arctic.lib.interactor;
-
- /**
- * Input protocol for objects wishing to receive drag input suitable for
- * moving the object.
- *
- * @see sub_arctic.input.move_drag_focus_agent
- * @author Scott Hudson
- */
- public interface move_draggable extends focusable, interactor {
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /** Dispatch the start of a drag to the object. Returns true if the drag
- * is accepted (and hence the event consumed). The x,y values give the
- * position of the start of drag in the parent's coordinate system as
- * filtered by the move_drag_filter object established with the move_drag
- * agent (if any). The event retains the original raw coordinate values.
- * grab_x, grab_y indicate the offset of the drag start point from the
- * origin of the object (this indicates the "grab point" within the object).
- * The user_info object passed here will be the one that was given to the
- * agent when focus was established.
- *
- * @param event evt The event which "caused" the drag.
- * @param int x x position where object should be placed at start
- * of drag (in parent's coordinates).
- * @param int y y position where object should be placed at start
- * of drag (in parent's coordinates).
- * @param int grab_x x position where drag started (in local coords).
- * @param int grab_y y position where drag started (in local coords).
- * @param Object user_info uninterpreted information provided when the object
- * was made the move-drag focus.
- * @return boolean indicating whether the input was consumed.
- */
- public boolean drag_start(
- event evt,
- int x, int y,
- int grab_x, int grab_y,
- Object user_info);
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /** Dispatch a movement during a drag. Returns true if the event should
- * be considered to have been consumed. The x,y values give the
- * current position of the of drag in the parent's coordinate system as
- * filtered by the move_drag_filter object established with the move_drag
- * agent (if any). start_x, start_y give the start position of the drag
- * (again, filtered by the established move_drag_filter object, if any).
- * The event retains the original raw coordinate values. grab_x, grab_y
- * indicate the offset of the drag start point from the origin of the
- * object at the start of dragging (this indicates the "grab point" within
- * the object). The user_info object passed here will be the one that was
- * given to the agent when focus was established.
- *
- * @param event evt The event which "caused" the drag.
- * @param int x x position where object should be placed at start
- * of drag (in parent's coordinates).
- * @param int y y position where object should be placed at start
- * of drag (in parent's coordinates).
- * @param int start_x x position where drag started (in parent's coords).
- * @param int start_y y position where drag started (in parent's coords).
- * @param int grab_x x position where drag started (in local coords).
- * @param int grab_y y position where drag started (in local coords).
- * @param Object user_info uninterpreted information provided when the object
- * was made the move-drag focus.
- * @return boolean indicating whether the input was consumed.
- */
- public boolean drag_feedback(
- event evt,
- int x, int y,
- int start_x, int start_y,
- int grab_x, int grab_y,
- Object user_info);
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
-
- /** Dispatch input corresponding to the end of a drag. Returns true if the
- * even should be considered to have been consumed. The x,y values give the
- * current position of the of drag in the parent's coordinate system as
- * filtered by the move_drag_filter object established with the move_drag
- * agent (if any). start_x, start_y give the start position of the drag
- * (again, filtered by the established move_drag_filter object, if any).
- * The event retains the original raw coordinate values. start_off_x,
- * start_off_y indicate the offset of the drag start point from the origin
- * of the object at the start of dragging (this indicates the "grab point"
- * within the object). The user_info object passed here will be the one
- * that was given to the agent when focus was established.
- *
- * @param event evt The event which "caused" the drag.
- * @param int x x position where object should be placed at start
- * of drag (in parent's coordinates).
- * @param int y y position where object should be placed at start
- * of drag (in parent's coordinates).
- * @param int start_x x position where drag started (in parent's coords).
- * @param int start_y y position where drag started (in parent's coords).
- * @param int grab_x x position where drag started (in local coords).
- * @param int grab_y y position where drag started (in local coords).
- * @param Object user_info uninterpreted information provided when the object
- * was made the move-drag focus.
- * @return boolean indicating whether the input was consumed.
- */
- public boolean drag_end(
- event evt,
- int x, int y,
- int start_x, int start_y,
- int grab_x, int grab_y,
- Object user_info);
-
- /* . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . */
- }
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-